using System.Text.Json.Serialization;

namespace Sage.CloudStorage.Qiniu.Models
{
    /// <summary>
    /// 直接数据处理结果
    /// </summary>
    public class DfopResult
    {
        /// <summary>
        /// 状态码，0表示成功
        /// </summary>
        [JsonPropertyName("code")]
        public int Code { get; set; }

        /// <summary>
        /// 处理结果数据
        /// </summary>
        [JsonPropertyName("data")]
        public byte[]? Data { get; set; }

        /// <summary>
        /// 处理结果的内容类型
        /// </summary>
        [JsonPropertyName("contentType")]
        public string? ContentType { get; set; }

        /// <summary>
        /// 错误信息，仅当处理失败时有值
        /// </summary>
        [JsonPropertyName("error")]
        public string? Error { get; set; }
    }
}